// UserService.java
package com.ny.service;

import com.ny.entity.Result;
import com.ny.entity.User;

public interface UserService {
    public User findNickname(String nickname);

    // 添加注册方法
    public boolean registerUser(User user);

    // 添加登录方法
    public User login(String username, String password);
    
    // 根据邮箱查询用户
    public User findUserByEmail(String email);
    
    // 根据邮箱更新密码
    public int updatePassword(String password, String email);
    
    // 给邮箱发送验证码
    public void sendToEmail(String toEmail);
    
    // 验证验证码并修改密码
    public Result verifyCodeAndUpdatePassword(String email, String code, String newPassword);
}